export default [
    {path:'/',redirect:'/home'},//当访问/的时候，重定向到/home路径
    {
        icon:'HomeOutlined',
        name:'home',
        path:'/home',
        component:'./home/index'
    },//.代表src/pages目录
    {
        icon:'ProfileOutlined',
        name:'profile',
        path:'/profile',
        component:'./profile/index'
    },
    {
        icon:'ReadOutlined',
        name:'book',
        path:'/book',
        component:'./book/index',
        access: 'adminCan',//当前登录用户的有权限才能看到此菜单和页面
    },
    {
        icon:'UserOutlined',
        name:'logout',
        path:'/logout',
        component:'./logout/index'
    },
    {
        icon:'UserOutlined',
        name:'user',
        path:'/user',
        component:'./user/index',
        routes:[
            {name:'add',path:'/user/add',component:'./user/add/index'},
            {name:'list',path:'/user/list',component:'./user/list/index'},
            {
                name:'detail',
                path:'/user/detail/:id',
                component:'./user/detail/index',
                hideInMenu:true
            }
        ]
    },
    {
        name:'注册',
        path:'/signup',
        component:'./signup/index',
        hideInMenu:true,//不要出现在菜单里
        layout:false,//不要把这个组件嵌套在布局组件中
    },
    {
        name:'登录',
        path:'/signin',
        component:'./signin/index',
        hideInMenu:true,//不要出现在菜单里
        layout:false,//不要把这个组件嵌套在布局组件中
    },
    {
        icon:'UserOutlined',
        name:'users',
        path:'/users',
        component:'./users/index'
    },
    { path: '/*', component: '@/pages/404' },
]